import App from '../App';
import Cart from '../pages/cart/Cart';
import Login from '../pages/login/Login';
import Register from '../pages/register/Register';
import Item from '../pages/item/Item';
import Product from '../pages/product/Product';
import Package from '../pages/package/Package';
import Userinfo from '../pages/userinfo/Userinfo';
import Main from '../pages/main/Main';
import { createBrowserRouter } from 'react-router-dom';
import { Order } from '../pages/order/order';
import ItemInfo from '../pages/item_info/ItemInfo';
export const router = createBrowserRouter([

    { path: '/main', element: <Main /> },
    { path: '/', element: <App /> },
    { path: "/user/:userId/cart", element: <Cart /> },
    { path: "/categories/:categoryId/products", element:<Product /> },
    { path: "/user/:userId/package", element: <Package /> },
    { path: "/products/:productId/items", element: <Item /> },
    {path:'/products/:productId/items/:itemId',element:<ItemInfo />},
    {path:'/login',element:<Login />},
    {path:'/register',element:<Register />},
    {path:"/user/:userId/info",element:<Userinfo />},
    {path:"/user/:userId/order",element:<Order />},
])
